import request from '@/utils/request'

// 查询代金券列表
export function listVoucher(query) {
  return request({
    url: '/system/Voucher/list',
    method: 'get',
    params: query
  })
}

// 查询代金券详细
export function getVoucher(VoucherId) {
  return request({
    url: '/system/Voucher/' + VoucherId,
    method: 'get'
  })
}

// 新增代金券
export function addVoucher(data) {
  return request({
    url: '/system/Voucher',
    method: 'post',
    data: data
  })
}

// 修改代金券
export function updateVoucher(data) {
  return request({
    url: '/system/Voucher',
    method: 'put',
    data: data
  })
}

// 删除代金券
export function delVoucher(VoucherId) {
  return request({
    url: '/system/Voucher/' + VoucherId,
    method: 'delete'
  })
}